//
//  FMJsonRead.m
//  FantasyMonster
//
//  Created by 冯志强 on 2024/1/29.
//

#import "FMJsonRead.h"

@implementation FMJsonRead

+(NSString *)jsonRead:(NSDictionary *)dic WithKey:(NSString *)key
{
    if ([dic isKindOfClass:[NSDictionary class]]) {
        if (dic && key) {
            NSString *str = [NSString stringWithFormat:@"%@",[dic objectForKey:key]];
            if ([[dic objectForKey:key] isKindOfClass:[NSNull class]]) {
                return @"";
            }
            if ([str isEqualToString:@"<null>"] || [str isEqualToString:@"(null)"]) {
                return @"";
            }
            return str;
        }
    }
    return @"";
}

@end
